package com.train.system.api;

import com.train.common.resp.CommonResp;
import com.train.system.resp.seat.TrainSeatPageResp;
import com.train.system.service.TrainSeatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TrainSeatApiImpl implements TrainSeatApi {

    @Autowired
    private TrainSeatService trainSeatService;

    @Override
    public CommonResp getTrainSeatListByTrainCodes(List<String> trainCodes) {
        List<TrainSeatPageResp> resp = trainSeatService.getTrainSeatListByTrainCodes(trainCodes);
        return CommonResp.ok(resp);
    }
}
